Merge conflicts solutioned
[RRRRHHHH_Code] / ruralHouses client / src / domain / Account.java
1 package domain;
2
3 import java.io.Serializable;
4 import java.util.Arrays;
5
6
7
8 public class Account implements Serializable {
9
10         /**
11          * 
12          */
13         private static final long serialVersionUID = 1L;
14         
15
16         private byte[] username;
17         private byte[] password;
18         private byte[] salt;
19
20
21         private Owner owner;
22         private boolean admin = false;
23
24         
25         public Account(String usr){
26                 
27                 
28         }
29         public Account(String usr, String pass, boolean isAdmin) {
30                 
31
32         }
33
34         public Account(String usr, String pass, Owner ow) {
35                 
36
37         }
38
39         public byte[] getUsername() {
40                 return username;
41         }
42
43         public byte[] getPassword() {
44                 return password;
45         }
46
47         public Owner getOwner() {
48                 return owner;
49         }
50
51         public boolean getAdmin() {
52                 return admin;
53         }
54
55         public void setAdmin(boolean admin) {
56                 this.admin = admin;
57         }
58
59         public byte[] getSalt() {
60                 return salt;
61         }
62
63         public void setSalt(byte[] salt) {
64                 this.salt = salt;
65         }
66         
67
68         @Override
69         public boolean equals(Object obj) {
70                 if (this == obj)
71                         return true;
72                 if (obj == null)
73                         return false;
74                 if (getClass() != obj.getClass())
75                         return false;
76                 Account other = (Account) obj;
77                 if (!Arrays.equals(password, other.password))
78                         return false;
79                 if (!Arrays.equals(username, other.username))
80                         return false;
81                 return true;
82         }
83
84 }